<nz-page-header nzTitle="refundLog">
    <nz-breadcrumb nz-page-header-breadcrumb>
        <nz-breadcrumb-item>
            <a [routerLink]="['/']">首页</a>
        </nz-breadcrumb-item>
        <nz-breadcrumb-item>
            <a [routerLink]="['/mall']"> {{ "mall" | translate}}</a>
        </nz-breadcrumb-item>
    </nz-breadcrumb>
</nz-page-header>

<nz-card [nzExtra]="extraAction">
    <ng-template #extraAction>
        <button nz-button nzSize="large" (click)="refresh()">{{'refresh' | translate}}</button>
    </ng-template>
    <nz-table #dataTable nzShowSizeChanger nzShowPagination [nzFrontPagination]="false" [nzData]="dataItems" [nzTotal]="pageingInfo.totalItems"
        [(nzPageSize)]="pageingInfo.pageSize" [(nzPageIndex)]="pageingInfo.pageNumber" [nzLoading]="pageingInfo.isTableLoading" (nzPageIndexChange)="refresh()" 
        (nzPageSizeChange)="refresh()">
        <thead>
            <tr>
                <!-- <th>id</th> -->
                <th>billNo</th>
                <th>price</th>
                <th>creationTime</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let item of dataTable.data">
                <!-- <td>{{item.id}}</td> -->
                <td>{{item.billNo}}</td>
                <td>{{item.price /100.0 | currency}}</td>
                <td>{{item.creationTime | momentFromNow}}</td>
                <td>
                    <button nz-button nzType="primary" nzSize="small" (click)="view(item)">{{'view' | translate}}</button>
                    <nz-divider nzType="vertical"></nz-divider>

                    <button nz-button nzType="primary" nzSize="small" (click)="startAudit(item)"
                        *ngIf="!item.isSuccess && item.audit<=0">{{'提交审核' | translate}}</button>
                    <nz-tag *ngIf="!item.isSuccess && item.audit>0"> 审核中 </nz-tag>
                </td>
            </tr>
        </tbody>
    </nz-table>
</nz-card>